<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center paymentSuccessful_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub paymentSuccessful_fd0_0'>
          <view class='flex flex-wrap align-center paymentSuccessful_fd0_0_c0' @tap.stop="handleJumpDiy"
            data-type="back" data-url="1">
            <text class='fu-iconfont2  paymentSuccessful_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='paymentSuccessful_fd0_0_c1_c0'>{{$t('支付结果')}}</text>
          </view>
          <view class='flex flex-wrap align-center justify-end paymentSuccessful_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-center benben-flex-layout paymentSuccessful_flex_1">
        <image class='paymentSuccessful_fd1_0' mode="aspectFit" :src='STATIC_URL+"74.png"'></image>
        <text class='paymentSuccessful_fd1_1'>{{$t('报名成功')}}</text>
        <view class='flex flex-wrap align-center paymentSuccessful_fd1_2'>
          <text class='paymentSuccessful_fd1_2_c0'>{{$t('支付方式')}}：</text>
          <text class='paymentSuccessful_fd1_2_c0'>{{orederInfo.pay_type_name}}</text>
        </view>
        <view class='flex flex-wrap align-center paymentSuccessful_fd1_3'>
          <text class='paymentSuccessful_fd1_2_c0'>{{$t('支付时间')}}：</text>
          <text class='paymentSuccessful_fd1_2_c0'>{{orederInfo.create_time}}</text>
        </view>
        <button class='paymentSuccessful_fd1_4' @click="goNext">{{$t('查看预约')}}</button>
      </view>

      <!---flex布局flex布局结束-->


    </view>
  </view>
</template>
<script>
  import Dayjs from '@/libs/day.js'
  export default {
    components: {},


    data() {
      return {
        "appCurrentTime": Date.parse(new Date()),
        "appCurrentTimer": null,
        "order": "",
        "pay": "",
        orederInfo: {
          tishi: '',
          pay_time: '',
          pay_type_name: '',
          dizhi: '',
          create_time: ''
        }
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },
      appSystemTime() {
        return Dayjs(this.appCurrentTime).format('HH:mm:ss')
      }
    },
    watch: {},
    onLoad(options) {
      let {
        order,
        pay
      } = options
      if (order !== undefined) this.order = order
      if (pay !== undefined) this.pay = pay
      this.getInfo()
      this.appCurrentTimer = setTimeout(() => {
        this.appCurrentTime = Date.parse(new Date())
      }, 1000)
    },
    onUnload() {
      clearTimeout(this.appCurrentTimer)
    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      getInfo() {
        this.$api.post(global.apiUrls.post6597b7200a767, {
          order_sn: this.order,
        }).then(res => {
          if (res.data.code == 1) {
            this.orederInfo = res.data.data
            console.log('thisss', this.orederInfo)
          }
        })
      },
      goNext() {
        uni.redirectTo({
          url: '/pages/wode/myAppointment/myAppointment'
        })
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: rgba(247, 243, 237, 1);
    background-size: 100% auto;
  }

  .paymentSuccessful_flex_0 {
    border-bottom: 1px solid #eee;
    background: rgba(247, 243, 237, 1);
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .paymentSuccessful_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .paymentSuccessful_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .paymentSuccessful_fd0_0_c0 {
    width: 120rpx;
  }

  .paymentSuccessful_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .paymentSuccessful_flex_1 {
    padding: 184rpx 0rpx 0rpx 0rpx;
  }

  .paymentSuccessful_fd1_4 {
    background: rgba(145, 47, 34, 1);
    border-radius: 44rpx;
    width: 466rpx;
    line-height: 88rpx;
    font-size: 32rpx;
    color: #fff;
    margin: 322rpx 0rpx 0rpx 0rpx;
  }

  .paymentSuccessful_fd1_3 {
    margin: 24rpx 0rpx 0rpx 0rpx;
  }

  .paymentSuccessful_fd1_2_c0 {
    color: #666666;
    font-size: 28rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .paymentSuccessful_fd1_2 {
    margin: 40rpx 0rpx 0rpx 0rpx;
  }

  .paymentSuccessful_fd1_1 {
    color: #333333;
    font-size: 36rpx;
    font-weight: 500;
    line-height: 42rpx;
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .paymentSuccessful_fd1_0 {
    width: 250rpx;
    height: 180rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }
</style>